<!--
 * @Autor: 黄旗
 * @Date: 2020-07-17 09:00:14
-->
<template>
    <div v-show="params.show ? params.show.show : true">
        <template v-if="params.icon">
            <Checkbox
                v-model="params.value"
                :value="params.value"
                :size="params.size"
                :disabled="params.disabled"
                :border="params.border"
                :true-value="params.trueValue"
                :false-value="params.falseValue"
                @on-change="$emit('on-change', $event)"
            >
                <Icon :type="it.icon"></Icon>
                <span>{{ params.label }}</span>
            </Checkbox>
        </template>
        <template v-if="!params.icon">
            <Checkbox
                v-model="params.value"
                :size="params.size"
                :disabled="params.disabled"
                :border="params.border"
                :true-value="params.trueValue"
                :false-value="params.falseValue"
                @on-change="$emit('on-change', $event)"
            >{{ params.label }}</Checkbox>
        </template>
    </div>
</template>

<script>
export default {
  props: ["params"],
};
</script>
